<?php
namespace app\face\controller;
use app\admin\controller\Common;
use app\service\roominfoService;
use app\service\apixcxService;
use think\Db;
class Lock extends Common{
	public function locklist(){
		$com = $this->pidTokenId();
		$whe['community_id'] = array('in',$com['community_id']);
		$communitylist = Db::name('community')->where($whe)->field('community_id,community_name')->select();;
        $community_id = $com['community_id'];
        $this->assign('communitylist',$communitylist);
        $page = request()->has('page') ? request()->get('page') : 1;
        $data = request()->get();
        if(!empty($data["community_name"])){
        	$whe["community_name"]=array("like","%".$data["community_name"]."%");
        }
        $userlist=Db::name('face_lock')
                ->where($whe)
                ->order('id desc')->paginate(100, false, [
                    'page'  =>  $page,
                    'query' =>  $whe
                ]);
        $this->assign("locklist",$userlist);
        foreach ($data as $k => $v) {
            $this->assign($k, $v);
        }
        return $this->fetch();
	}
	

	
}